#ifndef _CRT_MD5_H_
#define _CRT_MD5_H_

#include <crt_core.hpp>

#ifdef __cplusplus
extern "C" {
#endif

#define BUFFER_SIZE     0x1000
#define MD5_STRING_SIZE 0x10

typedef unsigned char md5_byte_t;
typedef unsigned int md5_word_t;

typedef struct md5_state_s {
    md5_word_t count[2];
    md5_word_t abcd[4];
    md5_byte_t buf[64];
} md5_state_t;

void md5_init(md5_state_t* pms);
void md5_append(md5_state_t* pms, const md5_byte_t* data, int nbytes);
void md5_finish(md5_state_t* pms, md5_byte_t digest[16]);

#ifdef __cplusplus
}
#endif

#endif
